<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="../../css/font.css" />
		<link rel="stylesheet" href="../../css/common.css" />

		<link rel="stylesheet" href="../../css/loans.css" />
		<script type="text/javascript">
			document.addEventListener('plusready', function() {
				//console.log("所有plus api都应该在此事件发生后调用，否则会出现plus is undefined。"

			});
		</script>

	</head>
	<body>

		<header class=" header-module ">
			<div class="flex-justify-align header-top">
				<a href="../../policy.html" class="iconfont iconfanhuijiantou header-back"></a>
				<p class="header-title">政企通 - 政策指南</p>
				<span class="header-span"></span>
			</div>

		</header>
		<article class="middle-moudle middle-moudle-detail">

			<section class="flex-justify-align base-interval loans-item ">
				<div class="loans-info" style="width: 100%;text-align: center;margin: 0px;">
					<p id="title"></p>
					<!-- <span>（即政发【2018】23号）</span> -->
					<span id="createTime"></span>
				</div>
			</section>

			<section class="flex-justify-align base-interval loans-detail">
				<div>
					<label id="content" style="text-indent: 2em;display:block"></label>
				</div>
			</section>


		</article>
	</body>
	<script src="../../js/jquery-3.0.0.min.js"></script>
	<script src="../../js/gloab.js"></script>
	<script>
		$(function() {
			var id = getUrlParam('id');
			loadData(id);
		});

		function loadData(id) {
			$.ajax({
				//请求方式    
				type: "GET",
				//文件位置    
				url: basePath+"app/tcompany/getOnePolicy",
				data: {
					"id": id
				},
				//返回数据格式为json,也可以是其他格式如    
				dataType: "json",
				//请求成功拼接html    
				success: function(data) {
					console.log(data);
					if (data.msg == 'success') {
						var tPolicyEntity = data.tPolicyEntity;
						$("#title").html(tPolicyEntity.title);
						$("#content").html(tPolicyEntity.content);
						$("#createTime").html(tPolicyEntity.createTime);
					} else {
						
					}
				}
			});
		}


		//获取url中的参数
		function getUrlParam(name) {
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
			var r = window.location.search.substr(1).match(reg); //匹配目标参数
			if (r != null) return unescape(r[2]);
			return null; //返回参数值
		}
	</script>
</html>
